package com.tduck.cloud.dashboard.entity;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.tduck.cloud.common.entity.BaseEntity;
import com.tduck.cloud.common.entity.SysBaseEntity;
import com.tduck.cloud.common.mybatis.handler.JacksonTypeHandler;
import lombok.Data;
import org.apache.ibatis.type.JdbcType;

import java.util.List;
import java.util.Map;

/**
 * 报仪盘对象 rp_dashboard
 *
 * @author tduck-gen
 * @date 2022-10-19 22:01:00
 */
@Data
@TableName(value = "rp_dashboard_page", autoResultMap = true)
public class DashboardPageEntity extends BaseEntity {

    /**
     *
     */
    private Long id;

    /**
     * 用户Id
     */
    private Long userId;


    /**
     * 唯一标识
     */
    private String shareKey;
    /**
     * 项目名
     */
    private String name;

    /**
     * 状态
     */
    private Integer publishStatus;

    /**
     * 返回时忽略
     */
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    @TableField(value = "access_password", updateStrategy = FieldStrategy.NOT_NULL)
    private String accessPassword;

    /**
     * 组件列表
     */
    @TableField(typeHandler = JacksonTypeHandler.class, jdbcType = JdbcType.VARCHAR)
    private List<Map<String, Object>> componentList;

    /**
     * 大屏配置
     */
    @TableField(typeHandler = JacksonTypeHandler.class, jdbcType = JdbcType.VARCHAR)
    private Map<String, Object> pageConfig;
}